package com.yyzx.controller;

import com.yyzx.pojo.Nurselevel;
import com.yyzx.pojo.vo.PageResult;
import com.yyzx.pojo.vo.Result;
import com.yyzx.service.NurselevelService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/nurselevel")
@Tag(name = "护理等级")
public class NurselevelController {
    @Autowired
    private NurselevelService nurselevelService;

    @GetMapping("/list")
    public Result<PageResult<List<Nurselevel>>> getList(
            @RequestParam(name="currentPage", defaultValue = "1")Integer currentPage,
            @RequestParam(name="pageSize", defaultValue = "10")Integer pageSize,
            @RequestParam(name="levelName", defaultValue = "")String levelName,
            @RequestParam(name="levelStatus", defaultValue = "")Integer levelStatus){
        return nurselevelService.getList(currentPage, pageSize, levelName, levelStatus);
    }
}
